package com.wlz.demo;

/**
 * 程序员
 */
public class SEmployee extends Employee {

    /**
     * 工作年限
     */
    private Integer workingYears;

    public SEmployee() {
        super();
    }


    public Integer getWorkingYears() {
        return workingYears;
    }

    public void setWorkingYears(Integer workingYears) {
        this.workingYears = workingYears;
    }

    /**
     *  计算工资
     * @return
     */
    @Override
    public String calculateSalary() {
        Double calculateSalary =  this.getBasicWage() + this.getWorkingYears() * 3;
        return this.getBasicWage() + "+3*" + this.getWorkingYears() + "=" +  calculateSalary;
    }

}
